package com.zwd.deep.entity.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.time.LocalTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 预约时间表
 * </p>
 *
 * @author zwd
 * @since 2025-02-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("appointments")
public class Appointments implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 预约唯一标识
     */
    @TableId(value = "appointment_id", type = IdType.AUTO)
    private Integer appointmentId;

    /**
     * 预约用户ID（关联用户表）
     */
    private Integer userId;

    /**
     * 预约医生ID（关联医生表）
     */
    private Integer doctorId;

    /**
     * 预约日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate appointmentDate;

    /**
     * 预约时间
     */
    @DateTimeFormat(pattern = "HH:mm")
    private LocalTime appointmentTime;


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime appointmentDateTime;

    /**
     * 预约状态（1: 可预约, 2: 已约满）
     */
    private Integer status;


}
